/**
 * Covalent Server Header File
 * 
 * File:        protocol.h
 * Brief:       BRIEF
 * Author:      Chen Kangbing
 * Email:       ckblau@outlook.com
 * Modified:    2021/10/09 08:52:03
 *
 */


#ifndef PROTOCOL_H
#define PROTOCOL_H

#ifdef __cplusplus
extern "C" {
#endif 


#include "prototype.h"


typedef struct {
    const char *name;
    MethodTypeEnum value;
} MethodMappingTypeDef;

typedef struct {
    int value;
    const char *reason;
} StatusMappingTypeDef;


int protocol_parse(TransactionTypeDef *ptrans, WorkerThreadTypeDef *pworker);
int protocol_pack(TransactionTypeDef *ptrans, WorkerThreadTypeDef *pworker);


#ifdef __cplusplus
}
#endif 

#endif
